package com.liuch.mybatis.design.proxy._01;

public class UserProxy implements UserService {

    private UserService userService;

    public UserProxy(UserService userService) {
        this.userService = userService;
    }

    @Override
    public Object selectList(String name) {
        System.out.println("代理执行了 start...");
        Object list = this.userService.selectList(name);
        System.out.println("代理执行了 end...");
        return list;
    }

    @Override
    public Object selectOne(String name) {
        System.out.println("代理类执行了one start...");
        Object one = this.userService.selectOne(name);
        System.out.println("代理执行了one end...");
        return one;
    }

}
